home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libobj / makefile.sh < prev    next >
Encoding:
Makefile  |  1994-08-09  |  1.8 KB  |  68 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting libobj/Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. OPTIMIZE = $optimize
  24. CCFLAGS = $ccflags $large
  25. RANLIB = $ranlib
  26. CC = $cc
  27. MKDEP = $mkdep
  28.  
  29. !GROK!THIS!
  30.  
  31. : In the following dollars and backticks do not need the extra backslash.
  32. $spitshell >>Makefile <<'!NO!SUBS!'
  33. LIB = ../libray.a
  34. INCLUDE = -I.. -I../..
  35. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  36. SHELL = /bin/sh
  37.  
  38. CFILES = blob.c bounds.c box.c cone.c csg.c cylinder.c disc.c grid.c \
  39.      hf.c instance.c list.c intersect.c geom.c plane.c poly.c \
  40.      roots.c sphere.c torus.c triangle.c findroot.c rotspline.c \
  41.      fl.c sweptsph.c flame.c ifs.c allocmatrix.c fractalobject.c mountain.c
  42.  
  43. OFILES = $(CFILES:.c=.o)
  44.  
  45. $(LIB): $(OFILES)
  46.     ar cur $(LIB) $(OFILES)
  47.     $(RANLIB) $(LIB)
  48.  
  49. clean:
  50.     rm -f $(OFILES)
  51.  
  52. realclean:
  53.     rm -f $(OFILES) *~ Makefile Makefile.bak
  54.  
  55.  
  56. depend:
  57.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  58.      $(MKDEP) $(CFILES) | sed 's/: \.\//: /; /\/usr\/include/d' \
  59.     ) >Makefile.new
  60.     cp Makefile Makefile.bak
  61.     cp Makefile.new Makefile
  62.     rm -f Makefile.new
  63.  
  64. # DO NOT DELETE THIS LINE
  65. !NO!SUBS!
  66. chmod 755 Makefile
  67. $eunicefix Makefile
  68.